home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Acao / BlueCustom.swf / scripts / frame_630 / PlaceObject2_333_210 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2008-09-26  |  1.3 KB  |  53 lines

  1. onClipEvent(enterFrame){
  2.    yit = Math.floor(Math.random() * 471) + 30;
  3.    if(this._x < -1500)
  4.    {
  5.       this._x = 900;
  6.       this._y = _root.depth._y + yit;
  7.       die = 1;
  8.       this.gotoAndPlay(1);
  9.    }
  10.    if(this._x > 1500)
  11.    {
  12.       this._x = -400;
  13.       this._y = _root.depth._y + yit;
  14.       die = 1;
  15.       this.gotoAndPlay(1);
  16.    }
  17.    this._x += _global.xgo;
  18.    this._y += _global.ygo;
  19.    if(die == 1)
  20.    {
  21.       if(_root.player.eat.hitTest(this.eat))
  22.       {
  23.          die = 0;
  24.          reat = new Sound();
  25.          reat.attachSound("magical bing");
  26.          reat.start(0,1);
  27.          this.gotoAndPlay("die");
  28.          scoreworth = 50;
  29.          multiplyer = 1;
  30.          if(_root.tools.powerup1._currentframe > 10)
  31.          {
  32.             multiplyer = 2;
  33.          }
  34.          scoreity = Math.round(scoreworth * multiplyer);
  35.          _root.tools.instascore.text = "+" + scoreity;
  36.          _root.tools.instblock._alpha = 0;
  37.          _global.scoreit = _global.scoreit * 1 + scoreity;
  38.          if(_global.goballs < 2)
  39.          {
  40.             _global.goballs = _global.goballs + 1;
  41.          }
  42.          if(_global.goballs == 1)
  43.          {
  44.             _root.player.ongoball1._alpha = 255;
  45.          }
  46.          if(_global.goballs == 2)
  47.          {
  48.             _root.player.ongoball2._alpha = 255;
  49.          }
  50.       }
  51.    }
  52. }
  53.